object Apl extends App {
	val TOTAL_CUSTOMERS = 3;
	val TOTAL_PROGRAMMERS = 7;
	val REQUIRED_PROGRAMMERS = 2;
	
	var random = new scala.util.Random
	
	println("Program started, have some faith");
	
	val teamLeader : TeamLeader = new TeamLeader();
	val secretary : Secretary = new Secretary(teamLeader);
	secretary.start();
	teamLeader.start();
	
	for(i <- 0 until TOTAL_CUSTOMERS) {
	  val customer : Customer = new Customer(secretary);
	  customer.start();
	  
	  Thread.sleep (random.nextInt(2000));
	  customer ! wantToMakeAppointment;
	}
	
	for(i <- 0 until TOTAL_PROGRAMMERS) {
	  val programmer : Programmer = new Programmer(secretary);
	  programmer.start();
	  
	  Thread.sleep (random.nextInt(2000));
	  programmer ! wantToMakeAppointment;
	}
}